﻿CREATE PROCEDURE [dbo].[Users_Search]
-- --------------------------------------------------------------------------------- 
-- Procedure Name: Users_Search
--
-- Description: Searches for a user
--
--
--
-- Version  Date          Author           Description
-- ---------------------------------------------------------------------------------
--  1       29-Dec-2011   The Collective   Created procedure
-- 
--
--
--
-- ---------------------------------------------------------------------------------
-- ---------------------------------------------------------------------------------
(@pSearchStr varchar(255))
AS
BEGIN
        SET NOCOUNT ON;
	
        
	Select Accounts_User.User_GUID, username, first_name, last_name, organisation, phone_number 
        from Accounts_User left outer join Accounts_User_Details on Accounts_User.User_GUID = Accounts_User_Details.User_GUID
        where Accounts_User.username like @pSearchStr; 
      
		  
		  
END;